import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/Login',
      name: 'Login',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/Login.vue'),
    },
    {
      path: '/AddKeiShi',
      name: 'AddKeiShi',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/KeiShi/AddKeiShi.vue'),
    },
    {
      path: '/ShowKeiShi',
      name: 'ShowKeiShi',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/KeiShi/ShowKeiShi.vue'),
    },
    {
      path: '/UpdateKeiShi/:id',
      name: 'UpdateKeiShi',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/KeiShi/UpdateKeiShi.vue'),
    },
    {
      path: '/AddDoctor',
      name: 'AddDoctor',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/Doctor/AddDoctor.vue'),
    },
    {
      path: '/ShowDoctor',
      name: 'ShowDoctor',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/Doctor/ShowDoctor.vue'),
    },
    {
      path: '/GetDoctor/:id',
      name: 'GetDoctor',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/Doctor/GetDoctor.vue'),
    },
    {
      path: '/AddWard',
      name: 'AddWard',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/Ward/AddWard.vue'),
    },
    {
      path: '/ShowWard',
      name: 'ShowWard',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/Ward/ShowWard.vue'),
    },
  ],
})

export default router
